package com.czb.seckill.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.czb.seckill.pojo.User;
import com.czb.seckill.vo.LoginVo;
import com.czb.seckill.vo.RespBean;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author: 陈正彬
 */
public interface UserService extends IService<User> {
    //完成用户登入校验
    RespBean doLogin(LoginVo loginVo, HttpServletRequest httpServletRequest,
                     HttpServletResponse httpServletResponse);

    //根据cookie-ticket,获取用户的信息
    User getUserByCookie(String userTicket,HttpServletRequest request,
                         HttpServletResponse response);

    //更新密码，解决redis缓存与DB数据不一致问题
    RespBean updatePassword(String userTicket,String password, HttpServletRequest request,
                            HttpServletResponse response);

}
